package PTA.javaB;
import java.util.Arrays;
import java.util.Scanner;
public class ex06 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int[] arr = new int[n];//定义数组
        int sum = 0;
        double avgr = 0;
        double s = 0;
        double s2 = 0;
        for (int i = 0; i < n; i++) {
            arr[i] = sc.nextInt();//把数据存放在数组中
            sum += arr[i];
        }
        Arrays.sort(arr);//排序
        System.out.println(Arrays.toString(arr));
        for (int i = arr.length - 1; i >= 0; i--) {
            System.out.print(arr[i] + " ");
        }
        System.out.println();
        avgr = 1.0 * sum / n;
        System.out.println("平均半径=" + avgr);
        for (int j = 0; j < n; j++) {
            s = Math.PI * arr[j] * arr[j];
            s2 = s2 + s;

        }
        System.out.printf("总面积=%.6f\n", s2);
    }
}